<template>
  <div class="ne-container">
    <hospitals-card
        v-for="item in educationList"
        :key="item.indexCode"
        :row="item"
    />
    <van-empty v-if="!educationList.length" description="暂无数据"/>
  </div>
</template>

<script>
import hospitalsCard from "./components/hospitalsCard.vue";
import {tbKeyPlacesList} from "../../api/tbKeyPlaces";
export default {
  name: 'wx_pages_zhfw_hospitalsPage',
  components:{hospitalsCard},
  data() {
    return {
      educationList:[]
    }
  },
  onPullDownRefresh() {
    this.search()
  },
  methods: {
    async search(){
      this.$showLoading("查询中...")
      let res = await tbKeyPlacesList({placesType:'1'})
      uni.stopPullDownRefresh()
      this.$hideLoading()
      if(res.data && res.data.length>0){
        this.educationList = res.data
      }else{
        this.educationList = []
      }
    },
  },
  mounted() {
    this.search()
  }
}
</script>
